<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
       <jsp:include page="includes/script.html"/>
        <title>Pf Graph</title>
    </head>

    <body>
        <center>
         <form method="get">


            From : <input type="text" value="${start}" name="start" readonly> <img src="images/calendar.gif" onclick="displayDatePicker('start', false, 'ymd', '-');" />&nbsp;
             To : <input type="text" value="${end}" name="end" readonly> <img src="images/calendar.gif" onclick="displayDatePicker('end', false, 'ymd', '-');" />&nbsp;
               <input  type="submit" name="submit" value="View" >

        </form>
        </center>
        <br>

        <center> <a href="pf-graph.png"><img src="pf-graph.png" width="800" border="0"></a></center>
       
        <c:if test='${not empty start}'>
        <br>
        <center>
        <table bgcolor="#000000" cellspacing="1" cellpadding="1" width="1000">
            <tr bgcolor="#FFFFFF">
                <td width="7%">Date</td>
                <c:forEach items="${data}" var="data">
                    <td width="3%" align="center"><fmt:formatDate pattern="d" value="${data.date}" /></td>
                </c:forEach>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="7%">% Pcs Day</td>
                <c:forEach items="${data}" var="data">
                    <td width="3%" align="center">${data.pcsday}</td>
                </c:forEach>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="7%">% Pcs Cumm</td>
                <c:forEach items="${data}" var="data">
                    <td width="3%" align="center">${data.pcscumm}</td>
                </c:forEach>
            </tr>
        </table>
            </center>
        </c:if>

    </body>
</html>
